package com.yanqu.road.entity.tradewar;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.Objects;

/**
 * 商战通缉记录
 */
public class TradeWarTrackRecord extends DataObject {

	private String recordUid;

	private String wantedUid;

	private long userId;

	private UserBaseInfo userBaseInfo = new UserBaseInfo();

	private int killPatronsCount;

	private int loseScore;

	private int myAddScore;

	private long recordTime;

	private int tradeWarMoney;
	private int activityId;

	public String getRecordUid() {
		return recordUid;
	}

	public void setRecordUid(String recordUid) {
		if(!Objects.equals(this.recordUid, recordUid)) {
			this.recordUid = recordUid;
			setUpdateOption();
		}
	}

	public String getWantedUid() {
		return wantedUid;
	}

	public void setWantedUid(String wantedUid) {
		if(!Objects.equals(this.wantedUid, wantedUid)) {
			this.wantedUid = wantedUid;
			setUpdateOption();
		}
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		if(this.userId != userId) {
			this.userId = userId;
			setUpdateOption();
		}
	}

	public UserBaseInfo getUserBaseInfo() {
		return userBaseInfo;
	}

	public String getUserBaseInfoJsonStr(){
		if(null == userBaseInfo){
			return "{}";
		}else {
			return JSON.toJSONString(userBaseInfo);
		}
	}

	public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
		this.userBaseInfo = userBaseInfo;
		setUpdateOption();
	}

	public int getKillPatronsCount() {
		return killPatronsCount;
	}

	public void setKillPatronsCount(int killPatronsCount) {
		if(this.killPatronsCount != killPatronsCount) {
			this.killPatronsCount = killPatronsCount;
			setUpdateOption();
		}
	}

	public int getLoseScore() {
		return loseScore;
	}

	public void setLoseScore(int loseScore) {
		if(this.loseScore != loseScore) {
			this.loseScore = loseScore;
			setUpdateOption();
		}
	}

	public long getRecordTime() {
		return recordTime;
	}

	public void setRecordTime(long recordTime) {
		if(this.recordTime != recordTime) {
			this.recordTime = recordTime;
			setUpdateOption();
		}
	}

	public int getMyAddScore() {
		return myAddScore;
	}

	public void setMyAddScore(int myAddScore) {
		if (this.myAddScore != myAddScore) {
			this.myAddScore = myAddScore;
			setUpdateOption();
		}
	}

	public int getTradeWarMoney() {
		return tradeWarMoney;
	}

	public void setTradeWarMoney(int tradeWarMoney) {
		if (this.tradeWarMoney != tradeWarMoney) {
			this.tradeWarMoney = tradeWarMoney;
			setUpdateOption();
		}
	}

	public int getActivityId() {
		return activityId;
	}

	public void setActivityId(int activityId) {
		if(this.activityId != activityId) {
			this.activityId = activityId;
			setUpdateOption();
		}
	}
}
